package com.swx.identityservice.dtos.scbpuser;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("输出用户Dto")
public class UserOutputDto {
    @ApiModelProperty("用户Id")
    private Integer id;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("登录别名")
    private String account;

    @ApiModelProperty("联系电话")
    private String phonenumber;

    @ApiModelProperty("邮箱")
    private String email;



    @Transient
    private String deptName;


    @ApiModelProperty("身份证、军官证号码")
    private String idnumber;

    @ApiModelProperty("是否是正式员工")
    private Boolean isinformal;

    @ApiModelProperty("创建人Id")
    private Integer creatoruserid;

    @ApiModelProperty(name = "创建人时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date creationtime;

    @ApiModelProperty(name = "最后修改时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastmodificationtime;

    @ApiModelProperty(name = "更新人Id")
    private Integer lastmodifieruserid;

    @ApiModelProperty("头像")
    private String avatorsrc;

    @ApiModelProperty("工作证号")

    private String worknum;

    private transient String unit;

    private transient String dept;


    @ApiModelProperty("身份类型")
    private  String cardtype;


    @Column(name = "UnitId")
    private Integer unitid;

    @Transient
    private  String affiliatedunit;

    @Transient
    private  String affiliateddept;

    @Transient
    private List<Integer> deptids  = new ArrayList<>();

    @Transient
    private List<Integer> roleids  = new ArrayList<>();

    @Transient
    private List<Integer> unitids  = new ArrayList<>();

}
